# coding=utf-8
from flask_script import Server
from application import manager, app
import traceback
import sys
import www

#web server可以自定义命令
manager.add_command( "runserver", Server( host=app.config["SERVER_HOST"], port=app.config["SERVER_PORT"], use_debugger=True, use_reloader=True ))

def main():
    manager.run()

if __name__ == '__main__':
    try :
        sys.exit( main() )
        pass
    except Exception as e:
        traceback.print_exc()